package cn.tedu.submarine;
import  java.util.Arrays;
public class More {
    public static void main(String[] args) {


        int[] a = {10,20,30,40,50};
        int[] b = {60,70};

        a = Arrays.copyOf(a,a.length+b.length);
        System.arraycopy(b,0,a,a.length-b.length,b.length);

        /*a = Arrays.copyOf(a,a.length+b.length);//扩容，增加b的长度
        System.arraycopy(b,0,a,a.length-b.length,b.length);*/

        System.out.println(Arrays.toString(a));
    }
}

